<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:variable name="cssPath" select="simorg/paths/css" />
	<xsl:variable name="imagePath" select="/simorg/paths/images" />
	<xsl:variable name="rootUrl" select="simorg/paths/rootUrl" />
	
	<xsl:template match="/">
		<html xmlns:html="http://www.w3.org/TR/xhtml1/strict" lang="en-US" >
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<link type="text/css" href="{$cssPath}/custom-theme/jquery-ui-1.8.9.custom.css" rel="Stylesheet"/>
				<link type="text/css" href="{$cssPath}main.css" rel="Stylesheet"/>
				<script type="text/javascript" src="http://localhost:8091/simorg/js/jquery-1.4.4.min.js"/>
				<script type="text/javascript" src="http://localhost:8091/simorg/js/jquery-ui-1.8.9.custom.min.js"></script>
				
				<script type="text/javascript">
					$(document).ready(function(){
  						$("input:submit", ".formdiv" ).button();
  						
  						$("input:text, input:password", ".formdiv" ).each (function() {
  							$(this).css("width", "100%"); 
  						});
  						
  						
  						$(".editNewOnly").each (function() {
  							if ( $(this).val() == null || $(this).val().length &lt; 1 ) {
  								$(this).attr("disabled", false); 
  							}
  							else {
  								$(this).attr("disabled", true); 
  							}
  						});
  					});
				</script>
				
				<title>SimOrg User View</title>
			</head>
			<body>
				<div class="ui-widget top_toolbar" style="font-size:smaller"><span style="float:left" >Simorg Administration Dashboard</span><a class="logoutLink" href="{$rootUrl}admin/logout">logout</a></div>
             	
				 <form name="userForm" action="{$rootUrl}user/save/{/simorg/selected-user/user/@id}" method="post">
				 	<div id="primaryformdiv" class=" ui-widget ui-widget-content ui-corner-all">
						<h3 style="margin:0px;padding:.5em" class="ui-widget-header div-title">User View</h3>
						<div class="formdiv ui-widget-content" style="padding-top:0px;margin-top:0px;">
							<fieldset>
							<div class="columnfieldlist">
								<ol>
									<li>
										<label for="firstName">First Name</label>
										<input type="text" name="firstName" id="firstName"  value="{simorg/selected-user/user/firstName}" />
									</li>
									<li>
										<label for="lastName">Last Name</label>
										<input type="text" name="lastName" id="lastName"  value="{simorg/selected-user/user/lastName}" />
									</li>
									<li>
										<label for="email">Email</label>
										<input type="text" name="email" id="email"  value="{simorg/selected-user/user/email}" />
									</li>
								</ol>
							</div>
							<div  class="columnfieldlist">
								<ol>
									<xsl:if test="simorg/viewoptions/passwordedit = 'true'">
									<li >
										<label for="username">Username</label>
										<input class="editNewOnly" type="text" name="username" id="username" value="{/simorg/selected-user/user/username}" />
									</li>	
									<li>
										<label for="password">Reset Password</label>
										<input type="password" name="password" id="password" value="{simorg/selected-user/user/password}" />
									</li>
									<li>
										<label for="password_check">Re-Type New Password</label>
										<input type="password" name="password_check" id="password_check" value="{simorg/selected-user/user/password}" />
									</li>
								</xsl:if>
								</ol>
							</div>
							</fieldset>
							
							<div class="toolbarLeft">
								<input type="submit" value="Save Changes" />
							</div>
						</div>
						
					</div>
					</form>
					
					
			</body>
		</html>
	</xsl:template>
	
</xsl:stylesheet>